﻿<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE xsl:stylesheet  [
	<!ENTITY nbsp   "&#160;">
	<!ENTITY copy   "&#169;">
	<!ENTITY reg    "&#174;">
	<!ENTITY trade  "&#8482;">
	<!ENTITY mdash  "&#8212;">
	<!ENTITY ldquo  "&#8220;">
	<!ENTITY rdquo  "&#8221;"> 
	<!ENTITY pound  "&#163;">
	<!ENTITY yen    "&#165;">
	<!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="CityFly" xmlns:page="urn:page">
  <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  <xsl:param name="rowcount"/>
  <!--数据库总记录数-->
  <xsl:param name="maxrow"/>
  <!--每页记录数-->
  <xsl:param name="curpage"/>
  <!--当前页码-->
  <xsl:param name="param"/>
  <!--引入 param 参数-->
  <xsl:param name="templatename"/>
  <!--Label.xml 模块名称-->
  <xsl:param name="orderby"/>
  <!--Label.xml orderby 参数-->
  <xsl:param name="where"/>
  <!--Label.xml where 参数-->
  <xsl:param name="runtime"/>
  <!--运行时长-->
  <msxsl:script language="javascript" implements-prefix="user">var n=5;
    var mR={MAXROW};
    function PageList(cP,rC,qStr){
    var pC=(rC%mR==0)?rC/mR:int(rC/mR)+1;
    var pStr="";
    cP=int(cP);
    if (pC>cP+n){var eP=cP+n;}else{var eP=pC;}
    if (cP-n&lt;=0){var sP=1;}else{var sP=cP-n;}
    if(cP>1){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP-1)+")&gt;&lt;&lt;&lt;\/a&gt; ";}
    if (cP>n+1){pStr=pStr+"&lt;a href=javascript:TM.tList(1)&gt;1&lt;\/a&gt; ...";}
    for (var i=sP;i&lt;=eP;i++)
    {
    if (i==cP)
    {
    pStr=pStr+" &lt;font class='current' &gt;&lt;b&gt;"+i+"&lt;/b&gt;&lt;\/font&gt; ";
    }else{
    pStr=pStr+" &lt;a href=javascript:TM.tList(" + i + ")&gt;"+i+"&lt;\/a&gt; ";
    }
    }
    if (pC>cP+n){pStr=pStr+"... &lt;a href=javascript:TM.tList("+pC+") class='path'&gt;"+pC+"&lt;\/a&gt;";}
    if(cP&lt;pC){pStr=pStr+" &lt;a href=javascript:TM.tList("+(cP+1)+")&gt;&gt;&gt;&lt;\/a&gt; ";}
    pStr=pStr+'&lt;input accesskey="g" title="快捷键(G)" style="border:1px solid #eeeeee;width:30px" id="page" type="text"/&gt;&lt;input  type="image" src="/Icons/bbGotopage.gif" onclick="TM.tList(TM.$(\'page\').value)" alt="Go" align="absmiddle" border="0" /&gt;'
    return pStr;
    }</msxsl:script>
  <xsl:template match="/">
    <div class="datastatus">
      <div id="runtime"> <strong>&nbsp;运行时长</strong><img src="/Images/Common/tangle.gif" width="10" height="10" hspace="2" align="absmiddle" /><xsl:value-of select="substring($runtime,1,5)"/>秒 </div>
      <div class="all">
        <input class="btnA" onclick="TM.tQuery()" type="button" value="全部" name="Submit52" />
      </div>
      <div class="query"><span class="smaple" style="background-color:#FFF3F0">禁用</span> <strong>查询条件<img src="/Images/Common/tangle.gif" hspace="2" vspace="2" align="absmiddle" /></strong> <span id="queryString_{$templatename}">&nbsp;</span> </div>
    </div>
    <div class="dataQuery">
      <form id="query_user">
        <label>编号:
          <input name="IDStart" type="text" class="w50" id="IDStart" value="{page:xRequest('idstart')}" />
          -
          <input name="IDEnd" type="text" class="w50" id="IDEnd" value="{page:xRequest('idend')}" />
        </label>
        <label>搜索:
          <input name="keywords" type="text" class="w100" value="{page:xRequest('keywords')}" />
        </label>
        <label>房源条数:
          &gt;=
          <input name="icount" type="text" class="w50" value="{page:xRequest('icount')}" />
        </label>
        <select name="isshop" size="1">
          <option value="">电话分类</option>
          <option value="0"><xsl:if test="page:xRequest('isshop')=0"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>个人</option>
          <option value="1"><xsl:if test="page:xRequest('isshop')=1"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>中介</option>
        </select>
        <select name="state" size="1">
          <option value="">全部状态</option>
          <option value="0"><xsl:if test="page:xRequest('state')=0"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>启用</option>
          <option value="1"><xsl:if test="page:xRequest('state')=1"><xsl:attribute name="selected">1</xsl:attribute></xsl:if>禁用</option>
        </select>
        <input class="btnA" onclick="TM.tQuery(Form.serialize('query_user'))" type="button" value="查询" />
      </form>
    </div>
    <div class="datahead">
      <div class="colLeft" style="WIDTH: 30px">
        <input 
onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
      </div>
      <div class="colLeft center" style="WIDTH: 50px"> 编号 </div>
      <div class="colLeft" style="WIDTH: 150px"> 用户信息</div>
      <div class="colLeft" style="WIDTH: 120px"> 绑定的电话 </div>
      <div class="colLeft center" style="WIDTH: 130px"> 注册登录时间 </div>
      <div class="colLeft center" style="WIDTH: 100px"> 最后登录 </div>
      <div class="colLeft center" style="WIDTH: 40px"> 状态 </div>
      <div class="colLeft center" style="WIDTH: 60px"> 房源 </div>
      <div class="colLeft center none" style="WIDTH: 120px"> 会员状态 </div>
      <div class="colRight center" style="WIDTH: 120px;"> 操作 </div>
    </div>
    <div class="datalist">
      <xsl:for-each select="rows/row">
        <div class="row" style="height:50px;{page:xIIF(F_DisableFlag=1,'background-color:#FFF3F0','')}">
          <xsl:attribute name="onclick">TM.swithClass(this,'row','row selectBg');
          <!--TM.contextMenu(event,'f=UserPopMenu&amp;id=<xsl:value-of select="ID"/>')-->
          </xsl:attribute>
          <b class="colLeft" style="WIDTH:30px; height:50px;">
          <input type="checkbox" name="ID" id="ID" unread="false" >
          <xsl:attribute name="value"><xsl:value-of select="ID"/></xsl:attribute>
          </input>
          </b>
          <div class="colLeft center" style="WIDTH: 50px; height:50px;"> <xsl:value-of select="ID"/> </div>
          <div class="colLeft" style="WIDTH: 150px;height:50px;">
            <div><a class="L" href="javascript:">
              <xsl:attribute name="onclick">TM.openTab('编辑登录帐号','<xsl:value-of select="ID"/>','')</xsl:attribute>
              <xsl:value-of select="F_UserName"/></a> </div>
            <div>
              <xsl:attribute name="title"><xsl:value-of select="F_FullName"/> - <xsl:value-of select="F_Phone"/>(<xsl:value-of select="F_Email"/>)</xsl:attribute>
              <xsl:value-of select="F_FullName"/>
              <xsl:if test="F_Phone!=''">
                (<xsl:value-of select="F_Phone"/>)
              </xsl:if>
            </div>
          </div>
          <div class="colLeft" style="WIDTH: 120px; height:50px;"> <xsl:value-of select="F_GetPassMobile"/> <br/>
            <a href="javascript:" title="黑名单">
            <xsl:if test="F_IsBlock!=1">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('加入黑名单','加入黑名单','phone=<xsl:value-of select="F_GetPassMobile"/>'))TM.tList();</xsl:attribute>
              <font style="color:#333">加黑</font>
            </xsl:if>
            <xsl:if test="F_IsBlock=1">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('移除黑名单','移除黑名单','phone=<xsl:value-of select="F_GetPassMobile"/>'))TM.tList();</xsl:attribute>
              <font style="background-color:#333; color:#FFF">移黑</font>
            </xsl:if>
            </a>&nbsp;
            <a href="javascript:" title="黑名单">
            <xsl:if test="F_IsShop!=1">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('加入中介名单','加入中介名单','phone=<xsl:value-of select="F_GetPassMobile"/>'))TM.tList();</xsl:attribute>
              <font style="color:#F30">加中介</font>
            </xsl:if>
            <xsl:if test="F_IsShop=1">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('移除中介名单','移除中介名单','phone=<xsl:value-of select="F_GetPassMobile"/>'))TM.tList();</xsl:attribute>
              <font style="background-color: #F30; color:#FFF">移中介</font>
            </xsl:if>
            </a></div>
          <div class="colLeft" style="WIDTH: 130px; height:50px;">
            <div>注册：<xsl:value-of select="substring(F_RegTime,3,14)"/></div>
            <div>更新：<xsl:value-of select="substring(F_UpdateTime,3,14)"/></div>
          </div>
          <div class="colLeft" style="WIDTH: 100px; height:50px;">
            <xsl:attribute name="onclick">TM.open('[xml]登录日志',{title:'登录日志(<xsl:value-of select="F_UserName"/>)',args:'id=<xsl:value-of select="ID"/>'})</xsl:attribute>
            <a  class="more"><xsl:value-of select="F_LastLoginIP"/>&nbsp;</a> <xsl:value-of select="substring(F_LastLoginTime,6,11)"/> </div>
          <div class="colLeft center" style="WIDTH: 40px; height:50px;">
            <xsl:choose>
              <xsl:when test="F_DisableFlag=0">
                启用
              </xsl:when>
              <xsl:otherwise>
                <font color="red">禁用</font>
              </xsl:otherwise>
            </xsl:choose>
          </div>
          <div class="colLeft center" style="WIDTH: 60px; height:50px;">
            <div><a href="javascript://{ID}">
              <xsl:attribute name="onclick">TM.openTab('出售房源','<xsl:value-of select="ID"/>','')</xsl:attribute>
              售(<xsl:value-of select="F_SellCount"/>)</a></div>
            <div> <a href="javascript://{ID}">
              <xsl:attribute name="onclick">TM.openTab('出租房源','<xsl:value-of select="ID"/>','')</xsl:attribute>
              租(<xsl:value-of select="F_RentOutCount"/>)</a></div>
          </div>
          <div class="colLeft center none" style="WIDTH: 120px; height:50px;"> <xsl:value-of select="F_ModeName"/><xsl:if test="count(AdminName)>0">(<b><xsl:value-of select="AdminName"/></b>)</xsl:if><br/>
          
            <xsl:if test="$templatename='个人用户'">
              <a href="javascript:">
              <xsl:attribute name="onclick">TM.openTab('转为中介','<xsl:value-of select="ID"/>','')</xsl:attribute>
              转为中介</a>
            </xsl:if>
            <xsl:if test="$templatename='中介用户'">
            <a href="javascript:"><xsl:attribute name="onclick">TM.openTab('跟单','<xsl:value-of select="ID"/>','')</xsl:attribute>跟单</a>
            </xsl:if>
          </div>
          <div class="colRight center" style="WIDTH: 120px; height:50px;"> <a href="javascript:">
            <xsl:attribute name="onclick">TM.openTab('编辑登录帐号','<xsl:value-of select="ID"/>','')</xsl:attribute>
            编辑 </a> <a href="javascript:">
            <xsl:attribute name="onclick">TM.open('[xml]跟踪进度',{title:'用户(<xsl:value-of select="F_UserName"/>)进度',args:'id=<xsl:value-of select="ID"/>',width:628,height:400})</xsl:attribute>
            进度(<xsl:value-of select="F_ProgressCount"/>) </a><br/>
            <a href="javascript:" title="刷新房源">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('刷新房源','刷新房源','id=<xsl:value-of select="ID"/>'))TM.tList();</xsl:attribute>
            刷新</a> <a href="javascript:" style="{page:xIIF(F_DisableFlag=0,'color: #C30','')}">
            <xsl:attribute name="onclick">if(TM.doConfirmCmd('启用禁用帐号','<xsl:value-of select="page:xIIF(F_DisableFlag=0,'禁用','启用')"/>帐号','id=<xsl:value-of select="ID"/>&amp;state=<xsl:value-of select="page:xIIF(F_DisableFlag=0,1,0)"/>'))TM.tList();</xsl:attribute>
            <xsl:value-of select="page:xIIF(F_DisableFlag=0,'禁用','启用')"/>帐号</a> </div>
        </div>
      </xsl:for-each>
    </div>
    <div class="pagelist">
      <div class="menu">
        <label>
          <input onclick="TM.CheckBoxSelect('ID',this.checked)" type="checkbox" />
          全选</label>
        &nbsp;&nbsp;
        <select name="todo" id="todo" class="styleA" onchange="if(TM.doCheckBoxCmd(this.value,'ID',this.options[this.selectedIndex].rel))TM.tList();else return this.selectedIndex=0;">
          <option value="" style="color:#666">批量操作...</option>
          <option value="启用禁用帐号" rel="0">启用</option>
          <option value="启用禁用帐号" rel="1" style="color:red;">禁用</option>
        </select>
      </div>
      <div class="pager"> 每页<xsl:value-of select="$maxrow"/>条| 共有 <xsl:value-of select="$rowcount"/> 条&nbsp;| 分页:<xsl:value-of select="user:PageList($curpage,$rowcount,'')" disable-output-escaping="yes"/> </div>
    </div>
    <input name="CurID" id="CurID" type="hidden" value="0" />
    <div id="divEditContent" style="WIDTH:98%;display:none;border: Solid #CCCCCC 1px;"> &nbsp; </div>
  </xsl:template>
</xsl:stylesheet>
